#include <stdio.h>

int main(){
	int cases=0;
	int a,b,m,count=0;
	
	scanf("%d",&cases);
	
	for(count=1;count<=cases;count++)
	{

	scanf("%d%d",&a,&b);
	// find the starting a, ending b
	a=(a%2)?a:a+1;
	b=(b%2)?b:b-1;
	
	// find the num. of integers in between: m = (b-a)/2+1
	m=(b-a)/2+1;
		
	// sum = ma + m(m-1)
	printf("Case %d: %d\n",count, a<b?m*a+m*m-m:0);
	
	// out put
	}
	
	
	getch();
	return 0;
}
